package com.atguigu.upp.mapper;

import com.atguigu.upp.bean.TagInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by Smexy on 2023/1/3
 */
public interface TagInfoMapper
{
    //根据计算的taskId,查询当前task计算的 tag的信息(包含标签名)
    @Select("select * from tag_info where tag_task_id = #{id}")
    TagInfo getTagByTaskId(@Param("id") String taskId);

    @Select(" SELECT " +
        "   * " +
        "  FROM tag_info " +
        "   WHERE `tag_task_id` IN " +
        "   ( SELECT id FROM `task_info` WHERE `task_status` = '1' ) ")
    List<TagInfo> getTagInfoTodayExecute();
}
